Getting Started
We recommend using SDKMAN to install the JDK, and Mandrel (the Quarkus-recommended version of GraalVM).
consolesdk install java 24.0.2.r22-mandrel sdk use java 24.0.2.r22-mandrel
Creating a Quarkus App
It is recommended to generate a starter app using the Quarkus Code Starter. If you already have a Quarkus app on hand, install with Maven or Gradle as follows:
Configuring Couchbase
Configure the connection in your application.properties
file, typically located in src/main/resources
:
propertiesquarkus.couchbase.connection-string=localhost quarkus.couchbase.username=username quarkus.couchbase.password=password
For additional configuration options, refer to the Quarkus Configuration Guide or API Reference.
Using the Extension
The extension produces an Application-scoped Cluster
bean that can be injected using the jakarta annotation @Inject
:
javapublic class QuarkusExample {
@Inject
Cluster cluster;
}
From there, you can use the Cluster object like you normally would with the Java SDK.
Refer to the Quarkus Guide for an example using quarkus-rest
to create HTTP endpoints.